<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    var y = 0;
    while (x != 4) {
        var x = prompt("请输入您要的操作：\n 1.存钱 \n 2.取钱 \n 3.显示余额 \n 4.退出");
        if (x == 1) {
            var a = prompt("请输入您需要存钱的数量：");
            y += Number(a);
            alert("您的余额为：" + y);
        } else if (x == 2) {
            var b = prompt("请输入您需要取钱的数量：");
            y -= Number(b);
            alert("您的余额为：" + y);
        } else if (x == 3) {
            alert("您的余额为：" + y);
        }
        else if (x == 4) {
            alert("正在退出");
        }
    }


    var arr =[1,2,3];
    console.log(arr);

</script>
</html>